package com.wlts.wzy.Base;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * Created by Wuzhiyong
 * on 2019-02-22 11:29
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class BaseEntity extends Model {
    @TableId("id")
    private Integer id;

    @Override
    protected Serializable pkVal() {
        return id;
    }


    /**
     * 创建时间
     */
    @ApiModelProperty(hidden = true)
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createDate;

    /**
     * 更新时间
     */
    @ApiModelProperty(hidden = true)
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime updateDate;

    /**
     * 更新者
     */
    @ApiModelProperty(hidden = true)
    private String updateBy;

    // @TableLogic
    @ApiModelProperty(hidden = true)
    @TableField(fill = FieldFill.INSERT)
    private String delFlag;


    @ApiModelProperty(value = "备注信息")
    private String remarks;

}
